import Request from '../utils/http.js';

export default {
	
	//获取用户信息
	getUserInfo: function(params) {
		return Request.httpTokenRequest({
			url: '/api/user/getUserInfo',
			method: 'POST',
			params: params
		});
	},
	
	//首页轮播图
	getBannerList: function(params) {
		return Request.httpRequest({
			url: '/api/index/getpcslideshow',
			method: 'POST',
			params: params
		});
	},
	
	//首页获取服务分类
	getServiceCate: function(params) {
		return Request.httpRequest({
			url: '/api/service/getallcate',
			method: 'POST',
			params: params
		})
	},
	
	//收藏
	setCollect: function(params) {
		return Request.httpTokenRequest({
			url: '/api/service/setCollect',
			method: 'POST',
			params: params
		});
	},
	
	//上传图片
	uploadImg: function(params) {
		return Request.httpUpload({
			url: '/api/common/upload',
			method: 'POST',
			params: params
		});
	},
	
	//领取企服代金券
	getActivity: function(params) {
		return Request.httpTokenRequest({
			url: '/api/user/get_exhibition_specific_activity',
			method: 'POST',
			params: params
		});
	},
	
	//新用户领取会员
	getUserActivity: function(params) {
		return Request.httpTokenRequest({
			url: '/api/user/getUserActivity',
			method: 'POST',
			params: params
		});
	},
	
	//新用户领取活动图片
	getActivityImg: function(params) {
		return Request.httpTokenRequest({
			url: '/api/service/get_activity_img',
			method: 'POST',
			params: params
		});
	}
}